package com.tan.service;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    //想拿到provider提供的票

    //要去注册中心拿
    @Reference//引用，(1)Pom坐标，(2)可以定义路径相同的接口名
    TicketService ticketService;
    public void buyTicket()
    {
        String ticket = ticketService.getTicket();
        System.out.println("在注册中心拿到一张票:"+ticket);
    }

}
